<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 7.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.css" integrity="sha256-6cQIC71/iBIYXFK+0RHAvwmjwWzkWd+r7v/BX3/vZDc=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/themes/green/pace-theme-minimal.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous"></script>

<script class="next-config" data-name="main" type="application/json">{"hostname":"sumumm.github.io","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.19.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"fold":{"enable":true,"height":300},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="本文主要是根文件系统——Buildroot基础知识相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:type" content="article">
<meta property="og:title" content="LV05-04-根文件系统-02-Buildroot-02-Buildroot基础">
<meta property="og:url" content="https://sumumm.github.io/post/64b1388b.html">
<meta property="og:site_name" content="苏木">
<meta property="og:description" content="本文主要是根文件系统——Buildroot基础知识相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/image-20241102191348911.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/image-20241102191429975.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/usingb017.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/usingb018.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/usingb019.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/image-20241127231941597.png">
<meta property="article:published_time" content="2024-11-29T02:27:26.000Z">
<meta property="article:modified_time" content="2025-06-13T16:25:57.046Z">
<meta property="article:author" content="苏木">
<meta property="article:tag" content="LV05-系统镜像">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/image-20241102191348911.png">


<link rel="canonical" href="https://sumumm.github.io/post/64b1388b.html">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":"","permalink":"https://sumumm.github.io/post/64b1388b.html","path":"post/64b1388b.html","title":"LV05-04-根文件系统-02-Buildroot-02-Buildroot基础"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>LV05-04-根文件系统-02-Buildroot-02-Buildroot基础 | 苏木</title>
  








    <script src="/js/browser_tools_disable.js"></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<!-- hexo injector head_end start --><link rel="stylesheet" href="https://unpkg.com/hexo-next-tags-plus@latest/lib/tag_plus.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">苏木</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">我的学习之路</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>苏木的家</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类页<span class="badge">42</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档页<span class="badge">673</span></a></li><li class="menu-item menu-item-flink"><a href="/flink/" rel="section"><i class="fa fa-link fa-fw"></i>友人帐</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于我</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="nav-text">一、准备工作</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E4%BE%9D%E8%B5%96%E5%AE%89%E8%A3%85"><span class="nav-text">1. 依赖安装</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E9%80%89%E6%8B%A9%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="nav-text">2. 选择配置文件</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-menuconfig%E9%85%8D%E7%BD%AE%E9%A1%B9%E8%AF%B4%E6%98%8E"><span class="nav-text">3. menuconfig配置项说明</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-Target-options"><span class="nav-text">3.1 Target options ---&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-Build-options"><span class="nav-text">3.2 Build options ---&gt; </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-3-Toolchain"><span class="nav-text">3.3 Toolchain ---&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-4-System-configuration"><span class="nav-text">3.4 System configuration ---&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-5-Kernel"><span class="nav-text">3.5 Kernel ---&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-6Target-packages"><span class="nav-text">3.6Target packages ---&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-7-Filesystem-images"><span class="nav-text">3.7 Filesystem images ---&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-8-Bootloaders"><span class="nav-text">3.8 Bootloaders ---&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-9-Host-utilities"><span class="nav-text">3.9 Host utilities ---&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-10-Legacy-config-options"><span class="nav-text">3.10 Legacy config options ---&gt;</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-%E4%BF%9D%E5%AD%98%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="nav-text">4. 保存配置文件</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-%E7%BC%96%E8%AF%91%E5%91%BD%E4%BB%A4"><span class="nav-text">5. 编译命令</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81Buildroot%E5%85%B6%E4%BB%96%E5%8A%9F%E8%83%BD"><span class="nav-text">二、Buildroot其他功能</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E8%BD%AF%E4%BB%B6%E5%8C%85%E6%97%A0%E6%B3%95%E4%B8%8B%E8%BD%BD%EF%BC%9F"><span class="nav-text">三、软件包无法下载？</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="苏木"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">苏木</p>
  <div class="site-description" itemprop="description">莫道桑榆晚，为霞尚满天</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">673</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">43</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/sumumm" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;sumumm" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://sumumm.github.io/post/64b1388b.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="苏木">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="苏木">
      <meta itemprop="description" content="莫道桑榆晚，为霞尚满天">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="LV05-04-根文件系统-02-Buildroot-02-Buildroot基础 | 苏木">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          LV05-04-根文件系统-02-Buildroot-02-Buildroot基础
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2024-11-29 10:27:26" itemprop="dateCreated datePublished" datetime="2024-11-29T10:27:26+08:00">2024-11-29</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/" itemprop="url" rel="index"><span itemprop="name">嵌入式开发</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/" itemprop="url" rel="index"><span itemprop="name">02IMX6ULL平台</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/" itemprop="url" rel="index"><span itemprop="name">LV05-系统镜像</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>7k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>26 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><p>本文主要是根文件系统——Buildroot基础知识相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。</p>
<span id="more"></span>

<!-- Photo: https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/ -->

<details class="folding-tag" blue><summary> 点击查看使用工具及版本 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center" rowspan="5">PC端开发环境</td>        <td align="center" width=150px>Windows</td>        <td align="left">Windows11</td>    </tr>    <tr>        <td align="center">Ubuntu</td>        <td align="left">Ubuntu20.04.2的64位版本</td>      </tr>    <tr>        <td align="center">VMware® Workstation 17 Pro</td>        <td align="left">17.6.0 build-24238078</td>      </tr>    <tr>        <td align="center">终端软件</td>        <td align="left">MobaXterm(Professional Edition v23.0 Build 5042 (license))</td>    </tr>    <tr>        <td align="center">Win32DiskImager</td>        <td align="left">Win32DiskImager v1.0</td>      </tr>    <tr>        <td align="center" rowspan="3">Linux开发板环境</td>        <td align="center">Linux开发板</td>        <td align="left">正点原子 i.MX6ULL Linux 阿尔法开发板</td>      </tr>    <tr>        <td align="center">uboot</td>        <td align="left">NXP官方提供的uboot，使用的uboot版本为U-Boot 2019.04</td>      </tr>    <tr>        <td align="center">linux内核</td>        <td align="left">linux-4.19.71(NXP官方提供)</td>      </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看本文参考资料 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center" rowspan="5">官方网站</td>        <td align="left"><a href="https://www.arm.com/" target="_blank">https://www.arm.com/</a></td>        <td align="left">ARM官方网站，在这里我们可以找到Cotex-Mx以及ARMVx的一些文档</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxp.com.cn/" target="_blank">https://www.nxp.com.cn/ </a></td>        <td align="left">NXP官方网站</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxpic.org.cn/" target="_blank">https://www.nxpic.org.cn/</a></td><td align="left">NXP 官方社区</td>    </tr>    <tr>        <td align="left"><a href="https://u-boot.readthedocs.io/en/latest/" target="_blank">https://u-boot.readthedocs.io/en/latest/</a></td><td align="left">u-boot官网</td>    </tr>    <tr>        <td align="left"><a href="https://www.kernel.org/" target="_blank">https://www.kernel.org/</a></td><td align="left">linux内核官网</td>    </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看相关文件下载 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center" rowspan="3">NXP</td>        <td align="left"><a href="https://github.com/nxp-imx" target="_blank">https://github.com/nxp-imx</a></td>        <td align="left">NXP imx开发资源GitHub组织，里边会有u-boot和linux内核的仓库</td>    </tr>    <tr>        <td align="left"><a href="https://github.com/nxp-imx/linux-imx/releases/tag/v4.19.71" target="_blank">nxp-imx/linux-imx/releases/tag/v4.19.71</a></td>        <td align="left">NXP linux内核仓库tags中的v4.19.71</td>    </tr>    <tr>        <td align="left"><a href="https://github.com/nxp-imx/uboot-imx/releases/tag/rel_imx_4.19.35_1.1.0" target="_blank">nxp-imx/uboot-imx/releases/tag/rel_imx_4.19.35_1.1.0</a></td>        <td align="left">NXP u-boot仓库tags中的rel_imx_4.19.35_1.1.0</td>    </tr>    <tr>        <td align="center" rowspan="2">I.MX6ULL</td>        <td align="left"><a href="https://www.nxp.com.cn/docs/en/data-sheet/IMX6ULLIEC.pdf" target="_blank">i.MX 6ULL Applications Processors for Industrial Products</a></td>        <td align="left">I.MX6ULL 芯片手册（datasheet，可以在线查看）</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxp.com.cn/webapp/Download?colCode=IMX6ULLRM&lang_cd=zh" target="_blank">i.MX 6ULL Applications ProcessorReference Manual</a></td>        <td align="left">I.MX6ULL 参考手册（下载后才能查看，需要登录NXP官网）</td>    </tr>    <tr>        <td align="center" rowspan="2">Source Code</td>        <td align="left"><a href="https://elixir.bootlin.com/linux/latest/source" target="_blank">https://elixir.bootlin.com/linux/latest/source</a></td>        <td align="left">linux kernel源码</td>    </tr>    <tr>        <td align="left"><a href="https://elixir.bootlin.com/u-boot/latest/source" target="_blank">https://elixir.bootlin.com/u-boot/latest/source</a></td>        <td align="left">uboot源码</td>    </tr></table>
              </div>
            </details>

<p>到后面我们肯定是要编译Buildroot源码，生成我们需要的根文件系统，这里我们先来了解一下这个Buildroot的一些基础知识。</p>
<h1 id="一、准备工作"><a href="#一、准备工作" class="headerlink" title="一、准备工作"></a><font size=3>一、准备工作</font></h1><h2 id="1-依赖安装"><a href="#1-依赖安装" class="headerlink" title="1. 依赖安装"></a><font size=3>1. 依赖安装</font></h2><p>Buildroot的使用是需要依赖源码包的，它会去寻找要编译的源码包，我们可以选择网络上的的源码包也可以选择本地的源码包，那么在这里我们就只选择本地的kernel与uboot源码包，前面我们也编译了kernel与uboot。</p>
<p>有一点要注意，更新了本地的源码包要用git记录，否则Buildroot不知道我们已经更新过的。</p>
<p>根据Buildroot官方文档说明，Buildroot会强制性使用一些工具包（<a target="_blank" rel="noopener" href="https://buildroot.org/downloads/manual/manual.html#requirement">The Buildroot user manual</a>）：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install -y sed make binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget g++-multilib</span><br></pre></td></tr></table></figure>

<p>这是为了Buildroot能正常编译，因此我们在使用前尽量查看一下当前系统的环境下是否存在这些软件包，或者可以直接通过sudo apt-get install命令去下载它们。</p>
<h2 id="2-选择配置文件"><a href="#2-选择配置文件" class="headerlink" title="2. 选择配置文件"></a><font size=3>2. 选择配置文件</font></h2><p>Buildroot为了方便用户使用，在configs目录下提前配置好了很多平台的配置，我们可以在这里找一个与我们开发板最符合的配置文件，然后根据文件中的配置来修改出我们开发板的配置文件即可。一般来说我们可以以<code>imx6ulevk_defconfig</code>这个文件为基础进行修改。我们现在不修改，直接以这个文件作为配置文件，我们可以运行以下命令将其写入到 <code>.config</code> 文件：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">make imx6ulevk_defconfig</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/image-20241102191348911.png" alt="image-20241102191348911" />

<p>很显然这操作过程与我们编译内核的过程是一样的，都是将配置文件的信息写入当前目录下的 .config文件中，然后通过make menuconfig 命令进行配置：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/image-20241102191429975.png" alt="image-20241102191429975" />

<p>这一张图好像有点大，后面就直接复制了，不截图了。</p>
<h2 id="3-menuconfig配置项说明"><a href="#3-menuconfig配置项说明" class="headerlink" title="3. menuconfig配置项说明"></a><font size=3>3. menuconfig配置项说明</font></h2><p>我们前面已经可以用命令打开图形配置界面了：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">─────────────────────────────────────────────────────────────────────────────────────</span><br><span class="line"> ┌───────────────────── Buildroot 2024.08-rc3 Configuration ──────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │        Target options  ---&gt;                                                │ │  </span><br><span class="line"> │ │        Toolchain  ---&gt;                                                     │ │  </span><br><span class="line"> │ │        Build options  ---&gt;                                                 │ │  </span><br><span class="line"> │ │        System configuration  ---&gt;                                          │ │  </span><br><span class="line"> │ │        Kernel  ---&gt;                                                        │ │  </span><br><span class="line"> │ │        Target packages  ---&gt;                                               │ │  </span><br><span class="line"> │ │        Filesystem images  ---&gt;                                             │ │  </span><br><span class="line"> │ │        Bootloaders  ---&gt;                                                   │ │  </span><br><span class="line"> │ │        Host utilities  ---&gt;                                                │ │  </span><br><span class="line"> │ │        Legacy config options  ---&gt;                                         │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<h3 id="3-1-Target-options"><a href="#3-1-Target-options" class="headerlink" title="3.1 Target options ---&gt;"></a><font size=3>3.1 <code>Target options ---&gt;</code></font></h3><p>目标单板架构配置，在这里主要是选择要编译的平台架构，如cortex-A7；选择CPU的大小端模式，选择支持浮点等等。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ Target options ────────────────────────────────────────────────────────────────────</span><br><span class="line"> ┌──────────────────────────────── Target options ────────────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │        Target Architecture (ARM (little endian))  ---&gt;                     │ │  </span><br><span class="line"> │ │        Target Architecture Variant (cortex-A7)  ---&gt;                       │ │  </span><br><span class="line"> │ │        Target ABI (EABIhf)  ---&gt;                                           │ │  </span><br><span class="line"> │ │        Floating point strategy (NEON/VFPv4)  ---&gt;                          │ │  </span><br><span class="line"> │ │        ARM instruction set (ARM)  ---&gt;                                     │ │  </span><br><span class="line"> │ │        Target Binary Format (ELF)  ---&gt;                                    │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<h3 id="3-2-Build-options"><a href="#3-2-Build-options" class="headerlink" title="3.2 Build options ---&gt; "></a><font size=3>3.2 <code>Build options ---&gt;</code> </font></h3><p>编译相关的配置，主要是一些编译时用到的选项，比如设置当前配置的保存位置（Location to save buildroot config），根据自己的路径设置即可，设置dl的路径（下载代码包使用的路径：$(TOPDIR)&#x2F;dl），多个线程编译的线程数量（如果设置为0则自动选择多个线程编译），是否使能编译器缓冲区；设置下载镜像Mirrors and Download locations：一般来说Buildroot会默认从国外的网站下载镜像，而在国内下载则很慢，我们可以修改镜像源：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置下载镜像Mirrors and Download locations：</span></span><br><span class="line">内核镜像源：https://mirror.bjtu.edu.cn/kernel</span><br><span class="line">GNU镜像源：https://mirrors.tuna.tsinghua.edu.cn/gnu/</span><br><span class="line">清华镜像站汇总：https://mirrors.tuna.tsinghua.edu.cn/</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">提示：用清华镜像站会找不到内核。</span></span><br><span class="line">北京交通大学镜像站：https://mirror.bjtu.edu.cn/</span><br><span class="line">中国科学技术大学镜像站：http://mirrors.ustc.edu.cn/</span><br></pre></td></tr></table></figure>

<p>Build options具体配置如下:</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ Build options ─────────────────────────────────────────────────────────────────────</span><br><span class="line"> ┌──────────────────────────────── Build options ─────────────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │        Commands  ---&gt;                                                      │ │  </span><br><span class="line"> │ │    (/home/sumu/7Linux/buildroot-2024.08-rc3/configs/imx6ulevk_defconfig) Lo│ │  </span><br><span class="line"> │ │    ($(TOPDIR)/dl) Download dir                                             │ │  </span><br><span class="line"> │ │    ($(BASE_DIR)/host) Host dir                                             │ │  </span><br><span class="line"> │ │        Mirrors and Download locations  ---&gt;                                │ │  </span><br><span class="line"> │ │    (0) Number of jobs to run simultaneously (0 for auto)                   │ │  </span><br><span class="line"> │ │    [ ] Enable compiler cache                                               │ │  </span><br><span class="line"> │ │    [ ] build packages with debugging symbols                               │ │  </span><br><span class="line"> │ │    [ ] build packages with runtime debugging info                          │ │  </span><br><span class="line"> │ │    [*] strip target binaries                                               │ │  </span><br><span class="line"> │ │    ()    executables that should not be stripped                           │ │  </span><br><span class="line"> │ │    ()    directories that should be skipped when stripping                 │ │  </span><br><span class="line"> │ │        gcc optimization level (optimization level 2)  ---&gt;                 │ │  </span><br><span class="line"> │ │    [ ] build packages with link-time optimisation                          │ │  </span><br><span class="line"> │ │        libraries (shared only)  ---&gt;                                       │ │  </span><br><span class="line"> │ │    ($(CONFIG_DIR)/local.mk) location of a package override file            │ │  </span><br><span class="line"> │ │    ()  global patch and hash directories                                   │ │  </span><br><span class="line"> │ │        Advanced  ---&gt;                                                      │ │  </span><br><span class="line"> │ │    [ ] Build Y2038-ready code                                              │ │  </span><br><span class="line"> │ │        *** Security Hardening Options ***                                  │ │  </span><br><span class="line"> │ │    -*- Build code with PIC/PIE                                             │ │  </span><br><span class="line"> │ │        Stack Smashing Protection (-fstack-protector-strong)  ---&gt;          │ │  </span><br><span class="line"> │ │        RELRO Protection (Full)  ---&gt;                                       │ │  </span><br><span class="line"> │ │        Buffer-overflow Detection (FORTIFY_SOURCE) (Conservative)  ---&gt;     │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<p><code>Mirrors and Download locations  ---&gt;</code>配置项如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ Build options → Mirrors and Download locations ────────────────────────────────────</span><br><span class="line"> ┌──────────────────────── Mirrors and Download locations ────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │    ()  Primary download site                                               │ │  </span><br><span class="line"> │ │    (https://sources.buildroot.net) Backup download site                    │ │  </span><br><span class="line"> │ │    (https://cdn.kernel.org/pub) Kernel.org mirror                          │ │  </span><br><span class="line"> │ │    (http://ftpmirror.gnu.org) GNU Software mirror                          │ │  </span><br><span class="line"> │ │    (http://rocks.moonscript.org) LuaRocks mirror                           │ │  </span><br><span class="line"> │ │    (https://cpan.metacpan.org) CPAN mirror (Perl packages)                 │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ │                                                                            │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<h3 id="3-3-Toolchain"><a href="#3-3-Toolchain" class="headerlink" title="3.3 Toolchain ---&gt;"></a><font size=3>3.3 <code>Toolchain ---&gt;</code></font></h3><p>工具链选项主要是让用户选择合适自己的交叉编译工具链，可以选择Buildroot提供的工具链（内部工具链 <code>Buildroot toolchain</code> ），也可以指定其他非Buildroot提供的工具链（外部工具链 <code>External toolchain</code> ），我们默认选择外部提供的工具链： <code>arm-linux-gnueabihf-gcc</code> ，C库可以选择uClibc-ng,、glibc 和musl，我们选择glibc，还有选择内核头文件版本（要求比目标内核版本新）、是否使能宽字符（WCHAR）支持（如果需要支持Python则需要使能）、选择gcc编译器版本、是否使能c++等，具体配置如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ Toolchain ─────────────────────────────────────────────────────────────────────────</span><br><span class="line"> ┌────────────────────────────────── Toolchain ───────────────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │        Toolchain type (Buildroot toolchain)  ---&gt;                          │ │  </span><br><span class="line"> │ │        *** Toolchain Buildroot Options ***                                 │ │  </span><br><span class="line"> │ │    (buildroot) custom toolchain vendor name                                │ │  </span><br><span class="line"> │ │        C library (glibc)  ---&gt;                                             │ │  </span><br><span class="line"> │ │        *** Kernel Header Options ***                                       │ │  </span><br><span class="line"> │ │        Kernel Headers (Same as kernel being built)  ---&gt;                   │ │  </span><br><span class="line"> │ │        Custom kernel headers series (5.15.x)  ---&gt;                         │ │  </span><br><span class="line"> │ │        *** Glibc Options ***                                               │ │  </span><br><span class="line"> │ │    [ ] Enable compatibility shims to run on older kernels                  │ │  </span><br><span class="line"> │ │    [ ] Install glibc utilities                                             │ │  </span><br><span class="line"> │ │        *** Binutils Options ***                                            │ │  </span><br><span class="line"> │ │        Binutils Version (binutils 2.41)  ---&gt;                              │ │</span><br><span class="line"> │ │    [ ] gprofng support                                                     │ │  </span><br><span class="line"> │ │    ()  Additional binutils options                                         │ │  </span><br><span class="line"> │ │        *** GCC Options ***                                                 │ │  </span><br><span class="line"> │ │        GCC compiler Version (gcc 13.x)  ---&gt;                               │ │  </span><br><span class="line"> │ │    ()  Additional gcc options                                              │ │  </span><br><span class="line"> │ │    [ ] Enable C++ support                                                  │ │  </span><br><span class="line"> │ │    [ ] Enable Fortran support                                              │ │  </span><br><span class="line"> │ │    [ ] Enable compiler OpenMP support                                      │ │  </span><br><span class="line"> │ │    [ ] Enable graphite support                                             │ │  </span><br><span class="line"> │ │        *** Host GDB Options ***                                            │ │  </span><br><span class="line"> │ │    [ ] Build cross gdb for the host                                        │ │  </span><br><span class="line"> │ │        *** Toolchain Generic Options ***                                   │ │  </span><br><span class="line"> │ │    [ ] Copy gconv libraries                                                │ │  </span><br><span class="line"> │ │    ()  Extra toolchain libraries to be copied to target                    │ │  </span><br><span class="line"> │ │    ()  Target Optimizations                                                │ │  </span><br><span class="line"> │ │    ()  Target linker options                                               │ │  </span><br><span class="line"> │ │        *** Bare metal toolchain ***                                        │ │  </span><br><span class="line"> │ │    [ ] Build a bare metal toolchain                                        │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<h3 id="3-4-System-configuration"><a href="#3-4-System-configuration" class="headerlink" title="3.4 System configuration ---&gt;"></a><font size=3>3.4 <code>System configuration ---&gt;</code></font></h3><p>系统相关的配置，比如配置系统主机名，它的主要作用是：在一个局域网中，每台机器都有一个主机名，用于主机与主机之间的便于区分，就可以为每台机器设置主机名，以便于以容易记忆的方法来相互访问；设置登陆界面的欢迎信息。选择密码的加密方式，我们可以选择SHA256加密算法（sha-25），设置root登陆的密码、设置默认的命令行终端（我们默认选择bash）、设置默认的登陆串口（开发板连接到电脑的输入&#x2F;输出）、设置系统默认的环境变量（PATH）、以及选择构建系统镜像版本，根文件系统覆盖（野火的配置中就将一些脚本与相关内容放到 <code>board/embedfire/ebf-imx6ull-pro/rootfs-overlay</code> 目录下，在制作成文件系统时将这些文件添加到文件系统中）、以及一些运行的脚本（buildroot官方为imx6ull制作的打包脚本： <code>board/freescale/common/imx/post-image.sh</code> ）等，具体配置如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ System configuration ──────────────────────────────────────────────────────────────</span><br><span class="line"> ┌───────────────────────────── System configuration ─────────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │        Root FS skeleton (default target skeleton)  ---&gt;                    │ │  </span><br><span class="line"> │ │    (buildroot) System hostname                                             │ │  </span><br><span class="line"> │ │    (Welcome to Buildroot) System banner                                    │ │  </span><br><span class="line"> │ │        Passwords encoding (sha-256)  ---&gt;                                  │ │  </span><br><span class="line"> │ │        Init system (BusyBox)  ---&gt;                                         │ │  </span><br><span class="line"> │ │        /dev management (Dynamic using devtmpfs only)  ---&gt;                 │ │  </span><br><span class="line"> │ │    (system/device_table.txt) Path to the permission tables                 │ │  </span><br><span class="line"> │ │    [ ] support extended attributes in device tables                        │ │  </span><br><span class="line"> │ │    [ ] Use symlinks to /usr for /bin, /sbin and /lib                       │ │  </span><br><span class="line"> │ │    [*] Enable root login with password                                     │ │  </span><br><span class="line"> │ │    ()    Root password                                                     │ │  </span><br><span class="line"> │ │        /bin/sh (busybox&#x27; default shell)  ---&gt;                              │ │  </span><br><span class="line"> │ │    [*] Run a getty (login prompt) after boot  ---&gt;                         │ │  </span><br><span class="line"> │ │    [*] remount root filesystem read-write during boot                      │ │  </span><br><span class="line"> │ │    ()  Network interface to configure through DHCP                         │ │  </span><br><span class="line"> │ │    (/bin:/sbin:/usr/bin:/usr/sbin) Set the system&#x27;s default PATH           │ │  </span><br><span class="line"> │ │    [*] Purge unwanted locales                                              │ │  </span><br><span class="line"> │ │    (C en_US) Locales to keep                                               │ │  </span><br><span class="line"> │ │    ()  Generate locale data                                                │ │  </span><br><span class="line"> │ │    [ ] Enable Native Language Support (NLS)                                │ │  </span><br><span class="line"> │ │    [ ] Install timezone info                                               │ │  </span><br><span class="line"> │ │    ()  Path to the users tables                                            │ │  </span><br><span class="line"> │ │    ()  Root filesystem overlay directories                                 │ │  </span><br><span class="line"> │ │    ()  Custom scripts to run before commencing the build                   │ │  </span><br><span class="line"> │ │    ()  Custom scripts to run before creating filesystem images             │ │  </span><br><span class="line"> │ │    ()  Custom scripts to run inside the fakeroot environment               │ │  </span><br><span class="line"> │ │    (board/freescale/common/imx/post-image.sh) Custom scripts to run after c│ │  </span><br><span class="line"> │ │    ()    Extra arguments passed to custom scripts                          │ │  </span><br><span class="line"> │ │    ()  Extra arguments passed to POST_IMAGE_SCRIPT                         │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<ul>
<li>Root FS skeleton (default target skeleton) ： 根文件系统框架 [默认目标框架]</li>
</ul>
<p>建议选择默认的根文件系统框架，因为默认的框架是非常小的，可以适应绝大部分的场合，当然，占用资源小也代表功能仅有一点点，读者可以自己往文件系统添加需要的功能，这是可以的。除此之外也可以选择自己的根文件系统框架（custom target skeleton）。</p>
<ul>
<li>(buildroot) System hostname ：系统主机名字(自取任意) [buildroot]</li>
<li>(Welcome to ixm6ull Buildroot!) System banner：系统开机提示 [Welcome to ixm6ull Buildroot!]</li>
<li>Passwords encoding (sha-256)：密码编码 [sha-256格式编码]</li>
<li>Init system (busybox) &rarr;：初始化系统方案 [busybox]</li>
</ul>
<p>初始化系统方案，目前buildroot中提供2种方案，一种是BusyBox：系统的init程序将在启动时读取&#x2F;etc&#x2F;inittab文件，以了解该做什么，默认inittab存储在.&#x2F;package&#x2F;busybox&#x2F;inittab中；inittab除了安装几个重要的文件系统之外 ，还要启动&#x2F;etc&#x2F;init.d&#x2F;rcS中的shell脚本，并启动一个getty程序(提供一个登录提示)。另一种是systemV，使用传统sysvinit程序，之前大多数台式机Linux发行版都使用该方案，现在有些变为了Upstart或Systemd，在构建文件系统的时候会在&#x2F;ect目录下会生成in it.d、rc0.d、rc1.d、rc2.d、rc3.d、rc4.d、rc5.d、rc6.d、rc.loacl等目录和脚本文件，init.d目录下包含的是真正的脚本。</p>
<ul>
<li>&#x2F;dev management (Dynamic using devtmpfs only) ：dev管理方案 [Dynamic using devtmpfs only]，就是&#x2F;dev设备文件的管理方式，可选选项有四个：</li>
</ul>
<p>（1）Static using device table: 使用静态的设备表，&#x2F;dev将根据system&#x2F;device_table _dev.txt的内容创建设备，进入系统添加或删除设备时，无法自动更新；</p>
<p>（2）Dynamic using devtmpfs only:在系统启动过程中，会动态生成&#x2F;dev文件，进入系统添加或删除设备时，无法自动更新；</p>
<p>（3）Dynamic using devtmpfs + mdev:在前面devtmpfs的基础上加入mdev用户空间实用程序，进入系统添加或删除设备时，可以自动更新，自动创建规则在&#x2F;etc&#x2F;mdev.conf;</p>
<p>（4）Dynamic using devtmpfs + eudev:在前面devtmpfs的基础上加入eudev用户空间守护程序，eudev是udev的独立版本，是Systemd的一部分，提供更多的功能也更占用资源；</p>
<ul>
<li>(system&#x2F;device_table.txt) Path to the permission tables ：权限表路径</li>
<li>[ ]support extended attributes in device tables：支持设备表中的扩展属性</li>
<li>[ ]Use symlinks to &#x2F;usr for &#x2F;bin, &#x2F;sbin and &#x2F;lib：是否将&#x2F;bin,&#x2F;sbin,&#x2F;lib链接到&#x2F;usr</li>
<li>[*] Enable root login with password：使能root登陆密码</li>
<li>() Root password：设置root密码</li>
<li>&#x2F;bin&#x2F;sh (bash) ：选择shell类型 [bash]</li>
</ul>
<p>一般选择bash即可，用户的体验会很好。除了bash外，还有很多shell工具，比如这里可选busybox自带的shell、小巧但功能很少的dash、高效紧凑的mksh、功能强大体积也稍大的zsh。</p>
<ul>
<li>[*] Run a getty (login prompt) after boot：启动后运行getty(登录提示)</li>
<li>[*] remount root filesystem read-write during boot ：在引导期间安装根文件系统支持读和写</li>
<li>(eth0) Network interface to configure through DHCP：设置DHCP配置的网络接口 [eth0]</li>
<li>(&#x2F;bin:&#x2F;sbin:&#x2F;usr&#x2F;bin:&#x2F;usr&#x2F;sbin) Set the system’s default PATH：设置系统的默认路径</li>
<li>[*] Purge unwanted locales：清除不需要的区域设置</li>
<li>(C en_US) Locales to keep：要保留的语言环境</li>
<li>() Generate locale data：生成区域设置数据</li>
<li>[ ]Enable Native Language Support (NLS) ：启用本地语言支持（NLS）</li>
<li>-*- Install timezone info ：安装时区信息</li>
<li>(default) timezone list：时区清单 [典型]</li>
<li>(Etc&#x2F;UTC) default local time ：用户表的路径</li>
<li>() Path to the users tables</li>
<li>() Root filesystem overlay directories：根文件系统覆盖目录</li>
</ul>
<p>根文件覆盖目录，如果想将某些文件添加到文件系统中，那么可以按照根文件的目录框架进行添加到对应的路径中，在文件系统构建的时候，会将对应的文件添加到文件系统中，如果出现相同的文件则覆盖。</p>
<ul>
<li>() Custom scripts to run before creating filesystem images：在创建文件系统映像之前运行的自定义脚本</li>
<li>() Custom scripts to run inside the fakeroot environment：自定义脚本在fakeroot(模拟root权限)环境中运行</li>
<li>(board&#x2F;……) Custom scripts to run after creating filesystem images ：创建文件系统映像后运行的自定义脚本</li>
<li>() Extra arguments passed to custom scripts：传递给自定义脚本的额外参数</li>
</ul>
<h3 id="3-5-Kernel"><a href="#3-5-Kernel" class="headerlink" title="3.5 Kernel ---&gt;"></a><font size=3>3.5 <code>Kernel ---&gt;</code></font></h3><p>linux内核相关的配置，用户可以选择要编译的内核版本及源码，可以从网上下载，除此之外也可以从本地导入（其实对Buildroot来说也算是下载，因为这些文件都会被下载到dl目录下），还可以指定编译内核的默认配置文件（ 此处的配置文件不需要后缀名defconfig）、内核二进制文件格式、选择是否编译设备树与指定编译的设备树（DTB）、以及其他的一些扩展。具体配置如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ Kernel ────────────────────────────────────────────────────────────────────────────</span><br><span class="line"> ┌──────────────────────────────────── Kernel ────────────────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │    [*] Linux Kernel                                                        │ │  </span><br><span class="line"> │ │          Kernel version (Custom version)  ---&gt;                             │ │  </span><br><span class="line"> │ │    (5.15.11) Kernel version                                                │ │  </span><br><span class="line"> │ │    ()    Custom kernel patches                                             │ │  </span><br><span class="line"> │ │          Kernel configuration (Using an in-tree defconfig file)  ---&gt;      │ │  </span><br><span class="line"> │ │    (imx_v6_v7) Defconfig name                                              │ │  </span><br><span class="line"> │ │    ()    Additional configuration fragment files                           │ │  </span><br><span class="line"> │ │    ()    Custom boot logo file path                                        │ │  </span><br><span class="line"> │ │          Kernel binary format (zImage)  ---&gt;                               │ │  </span><br><span class="line"> │ │          Kernel compression format (gzip compression)  ---&gt;                │ │  </span><br><span class="line"> │ │    [*]   Build a Device Tree Blob (DTB)                                    │ │  </span><br><span class="line"> │ │    [ ]     DTB is built by kernel itself                                   │ │    </span><br><span class="line"> │ │    (imx6ul-14x14-evk) In-tree Device Tree Source file names                │ │  </span><br><span class="line"> │ │    ()      Out-of-tree Device Tree Source file paths                       │ │  </span><br><span class="line"> │ │    [ ]     Keep the directory name of the Device Tree                      │ │  </span><br><span class="line"> │ │    [ ]     Build Device Tree with overlay support                          │ │  </span><br><span class="line"> │ │    [ ]   Install kernel image to /boot in target                           │ │  </span><br><span class="line"> │ │    [*]   Needs host OpenSSL                                                │ │  </span><br><span class="line"> │ │    [ ]   Needs host libelf                                                 │ │  </span><br><span class="line"> │ │    [ ]   Needs host pahole                                                 │ │  </span><br><span class="line"> │ │          Linux Kernel Extensions  ---&gt;                                     │ │  </span><br><span class="line"> │ │          Linux Kernel Tools  ---&gt;                                          │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<h3 id="3-6Target-packages"><a href="#3-6Target-packages" class="headerlink" title="3.6Target packages ---&gt;"></a><font size=3>3.6<code>Target packages ---&gt;</code></font></h3><p>这个是Buildroot的包管理相关的配置选项，读者可以从这里选择自己需要的软件包，Buildroot 提供了海量软件包可选，只需在配置界面选中所需要的软件包，交叉编译后即可使用。比如添加音视频应用相关的软件包、添加压缩和解压缩相关的软件包、添加字体、游戏、图形库（QT）、语言和脚本（Python、PHP等）、网络（蓝牙、wifi、http工具包）等软件包，在我们开发板就添加了支持QT与Python的软件包，因此可以在开发板中使用QT与Python，由于配置较多，就不再截图，根据配置文件查看即可。注意：<strong>Busybox是必选的</strong>。</p>
<p>假设我们系统中缺失一些库，那么可以在这里选择有没有对应的软件包，如果没有则需要自己手动制作了。具体配置如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ Target packages ───────────────────────────────────────────────────────────────────</span><br><span class="line"> ┌─────────────────────────────── Target packages ────────────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │    -*- BusyBox                                                             │ │  </span><br><span class="line"> │ │    (package/busybox/busybox.config) BusyBox configuration file to use?     │ │  </span><br><span class="line"> │ │    ()    Additional BusyBox configuration fragment files                   │ │  </span><br><span class="line"> │ │    [ ]   Show packages that are also provided by busybox                   │ │  </span><br><span class="line"> │ │    [ ]   Individual binaries                                               │ │  </span><br><span class="line"> │ │    [ ]   Install the watchdog daemon startup script                        │ │  </span><br><span class="line"> │ │        Audio and video applications  ---&gt;                                  │ │  </span><br><span class="line"> │ │        Compressors and decompressors  ---&gt;                                 │ │  </span><br><span class="line"> │ │        Debugging, profiling and benchmark  ---&gt;                            │ │  </span><br><span class="line"> │ │        Development tools  ---&gt;                                             │ │  </span><br><span class="line"> │ │        Filesystem and flash utilities  ---&gt;                                │ │  </span><br><span class="line"> │ │        Fonts, cursors, icons, sounds and themes  ---&gt;                      │ │  </span><br><span class="line"> │ │        Games  ---&gt;                                                         │ │  </span><br><span class="line"> │ │        Graphic libraries and applications (graphic/text)  ---&gt;             │ │  </span><br><span class="line"> │ │        Hardware handling  ---&gt;                                             │ │  </span><br><span class="line"> │ │        Interpreter languages and scripting  ---&gt;                           │ │  </span><br><span class="line"> │ │        Libraries  ---&gt;                                                     │ │  </span><br><span class="line"> │ │        Mail  ---&gt;                                                          │ │  </span><br><span class="line"> │ │        Miscellaneous  ---&gt;                                                 │ │  </span><br><span class="line"> │ │        Networking applications  ---&gt;                                       │ │  </span><br><span class="line"> │ │        Package managers  ---&gt;                                              │ │  </span><br><span class="line"> │ │        Real-Time  ---&gt;                                                     │ │  </span><br><span class="line"> │ │        Security  ---&gt;                                                      │ │  </span><br><span class="line"> │ │        Shell and utilities  ---&gt;                                           │ │  </span><br><span class="line"> │ │        System tools  ---&gt;                                                  │ │  </span><br><span class="line"> │ │        Text editors and viewers  ---&gt;                                      │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<h3 id="3-7-Filesystem-images"><a href="#3-7-Filesystem-images" class="headerlink" title="3.7 Filesystem images ---&gt;"></a><font size=3>3.7 <code>Filesystem images ---&gt;</code></font></h3><p>文件系统镜像配置。可以选择生成的文件系统镜像类型 ，如 <code>tar、cpio、ext2/3/4、 jffs2、 yaffs2 和 ubifs</code> 等。文件系统镜像可能会非常大，具体取决于我们选择的文件系统类型、软件包的数量以及是否配置的可用空间等，具体配置如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ Filesystem images ─────────────────────────────────────────────────────────────────</span><br><span class="line"> ┌────────────────────────────── Filesystem images ───────────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │    [ ] axfs root filesystem                                                │ │  </span><br><span class="line"> │ │    [ ] btrfs root filesystem                                               │ │  </span><br><span class="line"> │ │    [ ] cloop root filesystem for the target device                         │ │  </span><br><span class="line"> │ │    [ ] cpio the root filesystem (for use as an initial RAM filesystem)     │ │  </span><br><span class="line"> │ │    [ ] cramfs root filesystem                                              │ │  </span><br><span class="line"> │ │    [ ] erofs root filesystem                                               │ │  </span><br><span class="line"> │ │    [*] ext2/3/4 root filesystem                                            │ │  </span><br><span class="line"> │ │          ext2/3/4 variant (ext4)  ---&gt;                                     │ │  </span><br><span class="line"> │ │    (rootfs) filesystem label                                               │ │  </span><br><span class="line"> │ │    (60M) exact size                                                        │ │  </span><br><span class="line"> │ │    (0)   exact number of inodes (leave at 0 for auto calculation)          │ │  </span><br><span class="line"> │ │    (256) inode size                                                        │ │  </span><br><span class="line"> │ │    (5)   reserved blocks percentage                                        │ │  </span><br><span class="line"> │ │    (-O ^64bit) additional mke2fs options                                   │ │  </span><br><span class="line"> │ │          Compression method (no compression)  ---&gt;                         │ │  </span><br><span class="line"> │ │    [ ] f2fs root filesystem                                                │ │  </span><br><span class="line"> │ │    [ ] initial RAM filesystem linked into linux kernel                     │ │  </span><br><span class="line"> │ │    [ ] jffs2 root filesystem                                               │ │  </span><br><span class="line"> │ │    [ ] oci image                                                           │ │  </span><br><span class="line"> │ │    [ ] romfs root filesystem                                               │ │  </span><br><span class="line"> │ │    [ ] squashfs root filesystem                                            │ │  </span><br><span class="line"> │ │    [*] tar the root filesystem                                             │ │  </span><br><span class="line"> │ │          Compression method (no compression)  ---&gt;                         │ │  </span><br><span class="line"> │ │    ()    other random options to pass to tar                               │ │  </span><br><span class="line"> │ │    [ ] ubi image containing an ubifs root filesystem                       │ │  </span><br><span class="line"> │ │    [ ] ubifs root filesystem                                               │ │  </span><br><span class="line"> │ │    [ ] yaffs2 root filesystem                                              │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<ul>
<li><p>[ ]axfs root filesystem：XFS格式根文件系统</p>
</li>
<li><p>[ ]btrfs root filesystem ：btrfs格式根文件系统</p>
</li>
<li><p>[ ]cloop root filesystem for the target device：clop方式压缩根文件系统</p>
</li>
<li><p>[ ]cpio the root filesystem (for use as an initial RAM filesystem) ：cpio方式压缩根文件系统(用作初始RAM文件系统)</p>
</li>
<li><p>[ ]cramfs root filesystem：cramf格式根文件系统</p>
</li>
<li><p>[*] ext2&#x2F;3&#x2F;4 root filesystem ：ext2&#x2F;3&#x2F;4格式根文件系统</p>
</li>
<li><p>ext2&#x2F;3&#x2F;4 variant (ext4) ：ext4格式根文件系统</p>
</li>
<li><p>() filesystem label ：文件系统标签</p>
</li>
<li><p>(200M) exact size ：根文件系统空间大小[200M]</p>
</li>
<li><p>(0)   exact number of inodes (leave at 0 for auto calculation) ：确切的inode数(从0开始自动计算)</p>
</li>
<li><p>(5)   reserved blocks percentage：保留块百分比 (保留的供root使用,默认5%)</p>
</li>
<li><p>(-O ^64bit) additional mke2fs options ：额外的mke2fs选项 [禁用64位文件系统]</p>
</li>
<li><p>Compression method (no compression) ：压缩方式 [无压缩]</p>
</li>
<li><p>[ ]f2fs root filesystem ：f2fs格式根文件系统</p>
</li>
<li><p>[ ]initial RAM filesystem linked into linux kernel：初始RAM文件系统链接到Linux内核</p>
</li>
<li><p>[ ]jffs2 root filesystem：jffs2格式根文件系统</p>
</li>
<li><p>[ ]romfs root filesystem：romfs格式根文件系统</p>
</li>
<li><p>[ ]squashfs root filesystem ：squashfs格式根文件系统</p>
</li>
<li><p>[*] tar the root filesystem：tar压缩格式根文件系统</p>
</li>
<li><p>Compression method (no compression) ：压缩方式 [无压缩]</p>
</li>
<li><p>() other random options to pass to tar：传递给tar的其他选项</p>
</li>
<li><p>[ ]ubi image containing an ubifs root filesystem：ubifs格式根文件系统包含ubi镜像</p>
</li>
<li><p>[ ]ubifs root filesystem ：ubifs格式根文件系统</p>
</li>
<li><p>[ ]yaffs2 root filesystem：yaffs2格式根文件系统</p>
</li>
</ul>
<h3 id="3-8-Bootloaders"><a href="#3-8-Bootloaders" class="headerlink" title="3.8 Bootloaders ---&gt;"></a><font size=3>3.8 <code>Bootloaders ---&gt;</code></font></h3><p>Bootloaders相关的配置，在这个配置选项中，读者可以选择要编译的Bootloaders 引导程序（如 <code>grub2、ts4800-mbrboot、uboot</code> 等，我们默认选择uboot），指定uboot的名字、下载的位置（可以是从网上下载，写入正确的URL即可；也可以从本地导入，写入本地路径即可），指定uboot的版本，我们默认使用野火的uboot仓库，使用最新发布的uboot版本，具体配置如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br></pre></td><td class="code"><pre><span class="line">/home/sumu/7Linux/buildroot-2024.08-rc3/.config - Buildroot 2024.08-rc3 Configuration</span><br><span class="line">→ Bootloaders ───────────────────────────────────────────────────────────────────────</span><br><span class="line"> ┌───────────────────────────────── Bootloaders ──────────────────────────────────┐</span><br><span class="line"> │  Arrow keys navigate the menu.  &lt;Enter&gt; selects submenus ---&gt; (or empty        │  </span><br><span class="line"> │  submenus ----).  Highlighted letters are hotkeys.  Pressing &lt;Y&gt; selects a     │  </span><br><span class="line"> │  feature, while &lt;N&gt; excludes a feature.  Press &lt;Esc&gt;&lt;Esc&gt; to exit, &lt;?&gt; for     │  </span><br><span class="line"> │  Help, &lt;/&gt; for Search.  Legend: [*] feature is selected  [ ] feature is        │  </span><br><span class="line"> │ ┌────────────────────────────────────────────────────────────────────────────┐ │  </span><br><span class="line"> │ │    [ ] afboot-stm32                                                        │ │  </span><br><span class="line"> │ │    [ ] AT91 Bootstrap 3+                                                   │ │  </span><br><span class="line"> │ │    [ ] ARM Trusted Firmware (ATF)                                          │ │  </span><br><span class="line"> │ │    [ ] Barebox                                                             │ │  </span><br><span class="line"> │ │    [ ] grub2                                                               │ │  </span><br><span class="line"> │ │    [ ] mxs-bootlets                                                        │ │  </span><br><span class="line"> │ │    [ ] optee_os                                                            │ │  </span><br><span class="line"> │ │    [ ] s500-bootloader                                                     │ │  </span><br><span class="line"> │ │    [ ] shim                                                                │ │  </span><br><span class="line"> │ │    [*] U-Boot                                                              │ │  </span><br><span class="line"> │ │          Build system (Legacy)  ---&gt;                                       │ │  </span><br><span class="line"> │ │    (mx6ul_14x14_evk) U-Boot board name                                     │ │  </span><br><span class="line"> │ │          U-Boot Version (Custom version)  ---&gt;                             │ │  </span><br><span class="line"> │ │    (2021.10) U-Boot version                                                │ │  </span><br><span class="line"> │ │    ()    Custom U-Boot patches                                             │ │  </span><br><span class="line"> │ │    [*]   U-Boot needs dtc                                                  │ │  </span><br><span class="line"> │ │    [ ]   U-Boot needs host python 3.x                                      │ │  </span><br><span class="line"> │ │    [ ]   U-Boot needs pylibfdt                                             │ │  </span><br><span class="line"> │ │    [ ]   U-Boot needs pyelftools                                           │ │  </span><br><span class="line"> │ │    [*]   U-Boot needs OpenSSL                                              │ │  </span><br><span class="line"> │ │    [ ]   U-Boot needs lzop                                                 │ │  </span><br><span class="line"> │ │    [ ]   U-Boot needs gnutls                                               │ │  </span><br><span class="line"> │ │    [ ]   U-Boot needs util-linux                                           │ │  </span><br><span class="line"> │ │    [ ]   U-Boot needs xxd                                                  │ │  </span><br><span class="line"> │ │    [ ]   U-Boot use binman                                                 │ │  </span><br><span class="line"> │ │          U-Boot binary format  ---&gt;                                        │ │  </span><br><span class="line"> │ │    [ ]   produce a .ift signed image (OMAP)                                │ │  </span><br><span class="line"> │ │    [*]   Install U-Boot SPL binary image                                   │ │  </span><br><span class="line"> │ │    (SPL)   U-Boot SPL/TPL binary image name(s)                             │ │  </span><br><span class="line"> │ │    [ ]   Install u-boot-initial-env                                        │ │  </span><br><span class="line"> │ │    [ ]   CRC image for Altera SoC FPGA (mkpimage)                          │ │  </span><br><span class="line"> │ │    ()    Custom make options                                               │ │  </span><br><span class="line"> │ └────────────────────────────────────────────────────────────────────────────┘ │  </span><br><span class="line"> ├────────────────────────────────────────────────────────────────────────────────┤  </span><br><span class="line"> │            &lt;Select&gt;    &lt; Exit &gt;    &lt; Help &gt;    &lt; Save &gt;    &lt; Load &gt;            │  </span><br><span class="line"> └────────────────────────────────────────────────────────────────────────────────┘  </span><br></pre></td></tr></table></figure>

<h3 id="3-9-Host-utilities"><a href="#3-9-Host-utilities" class="headerlink" title="3.9 Host utilities ---&gt;"></a><font size=3>3.9 <code>Host utilities ---&gt;</code></font></h3><p>主机通用配置，使用默认配置即可。</p>
<h3 id="3-10-Legacy-config-options"><a href="#3-10-Legacy-config-options" class="headerlink" title="3.10 Legacy config options ---&gt;"></a><font size=3>3.10 <code>Legacy config options ---&gt;</code></font></h3><p>使用默认配置即可。</p>
<h2 id="4-保存配置文件"><a href="#4-保存配置文件" class="headerlink" title="4. 保存配置文件"></a><font size=3>4. 保存配置文件</font></h2><p>当配置完成，退出后会发现所有的配置都被写入当前目录下的 .config文件。如果想将这次配置的文件保存起来，那么可以通过以下命令保存：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">make savedefconfig</span><br></pre></td></tr></table></figure>

<p>这个命令我也不知道是存了什么东西，我自己就是直接保存.config文件重命名一下就是了。</p>
<h2 id="5-编译命令"><a href="#5-编译命令" class="headerlink" title="5. 编译命令"></a><font size=3>5. 编译命令</font></h2><p>然后我们可以执行 <code>make</code> 命令进行编译操作， <code>make</code> 命令通常会执行以下步骤：</p>
<p>（1）根据配置需要下载源文件</p>
<p>（2）配置、构建和安装交叉编译工具链，或者只是导入外部工具链</p>
<p>（3）配置、构建和安装选定的目标软件包</p>
<p>（4）则构建内核镜像</p>
<p>（5）构建引导加载程序镜像</p>
<p>（6）以所选格式创建根文件系统</p>
<p>执行 <code>make</code> 命令后就等待它编译完成即可，在编译完成后可以在 <code>output/images</code> 目录下找到编译产生的镜像。里面会有编译生成的设备树、内核、文件系统等。</p>
<blockquote>
<p>为什么可以直接make？因为后面会在图形界面配置编译工具链的。</p>
</blockquote>
<h1 id="二、Buildroot其他功能"><a href="#二、Buildroot其他功能" class="headerlink" title="二、Buildroot其他功能"></a><font size=3>二、Buildroot其他功能</font></h1><p>Buildroot是一个非常强大的工具，它可以随意依赖第三方的库以及工具，能快速构建我们需要的内容，如果你想了解一下Buildroot编译生成的内容的一些时间、依赖、大小等情况，通过代码肯定是不方便，Buildroot还提供可视化分析的工具，我们只需一句命令即可使用它们。</p>
<p>照官方文档的说明，需要在主机上安装必须的软件包python-matplotlib 和python-numpy，我们可以通过以下命令进行安装：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install -y python-matplotlib python-numpy</span><br></pre></td></tr></table></figure>

<p>Buildroot的工作之一是了解包之间的依赖关系，并确保它们以正确的顺序构建。 这些依赖关系有时可能非常复杂，对于给定的系统，通常不容易理解为什么这样或那样的包被Buildroot引入并且成功构建。为了帮助理用户解依赖关系，从而更好地理解嵌入式Linux系统中不同组件的作用，Buildroot能够生成依赖关系图，通过make graph-depends命令即可生成对应的依赖文件（默认是PDF格式），具体情况如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">命令</span></span><br><span class="line">make graph-depends</span><br></pre></td></tr></table></figure>

<p>当然，Buildroot还能生成关于编译时间与编译占用资源大小的分析图，只需要通过make graph-build与make graph-size命令生成即可，具体见（已删减输出信息）：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">make graph-build</span><br><span class="line">make graph-size</span><br></pre></td></tr></table></figure>

<p>然后可以看到在output&#x2F;graphs目录下多了一些pdf文件，这些就是Buildroot生成的可视化分析文件，可以直接打开他们，具体见：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/usingb017.png" alt="buildroot" style="zoom:50%;" />



<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/usingb018.png" alt="buildroot" style="zoom:50%;" />



<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/usingb019.png" alt="buildroot" style="zoom:50%;" />

<h1 id="三、软件包无法下载？"><a href="#三、软件包无法下载？" class="headerlink" title="三、软件包无法下载？"></a><font size=3>三、软件包无法下载？</font></h1><p>由于buildroot会在国外的网站下载很多东西，所以在下载时会很慢很慢，有可能出现下载失败的情况，那么可以根据日志信息手动去下载对应的软件包下载完毕后放在 <code>dl</code>目录下即可。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/LV05-04-%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F-02-Buildroot-02-Buildroot%E5%9F%BA%E7%A1%80/img/image-20241127231941597.png" alt="image-20241127231941597" />

    </div>

    
    
    

    <footer class="post-footer">




    <div>
        
            <div style="text-align:center;color: #ccc;font-size:14px;">
            ----------本文结束
            <i class="fas fa-fan fa-spin" style="color: #FF1493; font-size: 1rem"></i>
            感谢您的阅读----------
            </div>
        
    </div>





  
  <div class="my_post_copyright"> 
    <p><span>文章标题:</span><a href="/post/64b1388b.html">LV05-04-根文件系统-02-Buildroot-02-Buildroot基础</a></p>
    <p><span>文章作者:</span><a href="/" title="欢迎访问 《苏木》 的学习笔记">苏木</a></p>
    <p><span>发布时间:</span>2024年11月29日 - 10:27</p>
    <p><span>最后更新:</span>2025年06月14日 - 00:25</p>
    <p><span>原始链接:</span><a href="/post/64b1388b.html" title="LV05-04-根文件系统-02-Buildroot-02-Buildroot基础">https://sumumm.github.io/post/64b1388b.html</a></p>
    <p><span>许可协议:</span><i class="fab fa-creative-commons"></i> <a rel="license" href= "https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
  </div>
  


          <div class="post-tags">
              <a href="/tags/LV05-%E7%B3%BB%E7%BB%9F%E9%95%9C%E5%83%8F/" rel="tag"><i class="fa fa-tag"></i> LV05-系统镜像</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/bdadd1c2.html" rel="prev" title="LV05-04-根文件系统-02-Buildroot-03-Buildroot构建rootfs">
                  <i class="fa fa-angle-left"></i> LV05-04-根文件系统-02-Buildroot-03-Buildroot构建rootfs
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/5c8dd6fd.html" rel="next" title="LV05-04-根文件系统-02-Buildroot-01-Buildroot简介">
                  LV05-04-根文件系统-02-Buildroot-01-Buildroot简介 <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 2017 – 
    <span itemprop="copyrightYear">2025</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">苏木</span>
  </div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">3.7m</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">225:26</span>
  </span>
</div>




    <span id="sitetime"></span>
    <script defer language=javascript>
        function siteTime()
        {
            window.setTimeout("siteTime()", 1000);
            var seconds = 1000;
            var minutes = seconds * 60;
            var hours = minutes * 60;
            var days = hours * 24;
            var years = days * 365;
            var today = new Date();
            var todayYear = today.getFullYear();
            var todayMonth = today.getMonth()+1;
            var todayDate = today.getDate();
            var todayHour = today.getHours();
            var todayMinute = today.getMinutes();
            var todaySecond = today.getSeconds();
            /*==================================================
            Date.UTC() -- 返回date对象距世界标准时间(UTC)1970年1月1日午夜之间的毫秒数(时间戳)
            year        - 作为date对象的年份，为4位年份值
            month       - 0-11之间的整数，做为date对象的月份
            day         - 1-31之间的整数，做为date对象的天数
            hours       - 0(午夜24点)-23之间的整数，做为date对象的小时数
            minutes     - 0-59之间的整数，做为date对象的分钟数
            seconds     - 0-59之间的整数，做为date对象的秒数
            microseconds - 0-999之间的整数，做为date对象的毫秒数
            ==================================================*/
            var t1 = Date.UTC(2017, 
                              5, 
                              19, 
                              0, 
                              0, 
                              0); //北京时间
            var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
            var diff = t2-t1;
            var diffYears = Math.floor(diff/years);
            var diffDays = Math.floor((diff/days)-diffYears*365);
            var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
            var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
            var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
            document.getElementById("sitetime").innerHTML="已在这里 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒";
        }
        siteTime();
    </script>



    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/next-theme-pjax/0.6.0/pjax.min.js" integrity="sha256-vxLn1tSKWD4dqbMRyv940UYw4sXgMtYcK6reefzZrao=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.umd.js" integrity="sha256-ytMJGN3toR+a84u7g7NuHm91VIR06Q41kMWDr2pq7Zo=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/lozad.js/1.16.0/lozad.min.js" integrity="sha256-mOFREFhqmHeQbXpK2lp4nA3qooVgACfh88fpJftLBbc=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.1/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>




  <script src="/js/third-party/fancybox.js"></script>

  <script src="/js/third-party/pace.js"></script>


  




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


 
        <div id="click-show-text"
            data-mobile = false
            data-text = 富强,民主,文明,和谐,自由,平等,公正,法制,爱国,敬业,诚信,友善
            data-fontsize = 15px
            data-random= false>
        </div>
       

      
        <script async src=https://cdn.jsdelivr.net/npm/hexo-next-mouse-effect@latest/click/showText.js></script>
      

      
    




    <script async src="/js/fancybox_param.js"></script>





<!-- APlayer本体 -->



</body>
</html>
